﻿using RayDen.Library.Core.Primitives;

namespace RayDen.RayEngine.Engines.MCMC
{
    public class PssMltEngineController
    {
        public static int MaxMutations = 1000;
        public static int WarmupIterations = 1;

        public static float LargeStepProbability = 0.1f;
        internal ContributionMap imagePlane;

        public PssMltEngineController()
        {
            
        }

        public void Init(int w, int h)
        {
            imagePlane = new ContributionMap(w, h);
        }

        public RgbSpectrum B(int x, int y)
        {
            var result = imagePlane[x, y].Radiance;
            return result;
        }

        public static float Importance(ref RgbSpectrum contribution)
        {
            return contribution.y();
            //return contribution.Max();
        }
    }
}